//
//  YYSVideoJianjieCell.m
//  FanLaiWu
//
//  Created by gonglei on 17/3/20.
//  Copyright © 2017年 yys. All rights reserved.
//

#import "YYSVideoJianjieCell.h"

@interface YYSVideoJianjieCell ()
@property (weak, nonatomic) IBOutlet UIView *topView;


@property (weak, nonatomic) IBOutlet UIImageView *iconview;


@end

@implementation YYSVideoJianjieCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    [self.topView addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(clickZhankai:)]];
}
- (void)clickZhankai:(UITapGestureRecognizer *)tap {
    _iconview.userInteractionEnabled = !_iconview.userInteractionEnabled;
    if (_iconview.userInteractionEnabled) {
        [UIView animateWithDuration:0.5 animations:^{
            _iconview.transform = CGAffineTransformMakeRotation(M_PI/2);
        }];
        [[NSNotificationCenter defaultCenter] postNotificationName:@"zhankai" object:nil];
    }
    else
    {
        [UIView animateWithDuration:0.5 animations:^{
            _iconview.transform = CGAffineTransformIdentity;
        }];
        [[NSNotificationCenter defaultCenter] postNotificationName:@"shouqi" object:nil];
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
